﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SharePoint.Explorer.aspx.cs" Inherits="SharePoint.Explorer.Layouts.SharePoint.Explorer.SharePoint" DynamicMasterPageFile="~site/masterpages/BlankMasterPage.master" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>

    <meta http-equiv="X-UA-Compatible" content="IE=10" />
    <meta name="GENERATOR" content="Microsoft SharePoint" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Expires" content="0" />

    <title>SharePoint Explorer</title>

    <link rel="stylesheet" href="CSS/Splitter.css" />
    <link rel="stylesheet" href="CSS/SPExplorer.css" />
    <link rel="stylesheet" href="CSS/CSSTree.css" />
    <link rel="stylesheet" href="CSS/bootstrap-combined.min.css" />
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css" />
    <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.1.0/css/buttons.dataTables.min.css" />
    <link rel="stylesheet" href="CSS/jquery.datetimepicker.css" />
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/themes/default/style.min.css" />
</head>
<body>
    <script src="JS/jquery-1.11.2.min.js" type="text/javascript"></script>
    <%--<script src="//code.jquery.com/jquery-1.10.2.js"></script>--%>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"  type="text/javascript"></script>
    <script src="JS/bootstrap.min.js" type="text/javascript"></script>
    <script src="JS/jQuery.Splitter.js" type="text/jscript"></script>
    <script src="JS/moment-with-locales.js" type="text/jscript"></script>
    <script src="JS/jquery.datetimepicker.full.js" type="text/jscript"></script>
    <script src="JS/SPExplorer.js" type="text/jscript"></script>
    <script src="JS/CAMLBuilder.js" type="text/jscript"></script>
    <script src="JS/SPListManager.js" type="text/jscript"></script>
    <script src="JS/SelectUserDialog.js" type="text/jscript"></script>
    <script src="JS/SelectCamlFolderDialog.js" type="text/jscript"></script>

    <script src="https://cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js" type="text/jscript"></script>
    <script src="https://cdn.datatables.net/buttons/1.1.0/js/dataTables.buttons.min.js" type="text/jscript"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js" type="text/jscript"></script>
    <script src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js" type="text/jscript"></script>
    <script src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js" type="text/jscript"></script>
    <script src="//cdn.datatables.net/buttons/1.1.0/js/buttons.html5.min.js" type="text/jscript"></script>

    <script src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="JS/Validation.js" type="text/jscript"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js" type="text/jscript"></script>

    <div id="SPEheader">
        <h3 id="SPEheaderText">&nbsp;&nbsp;SharePoint 2013 Explorer</h3>
    </div>

    <div id="SPEsidebar">
        <div id="SPEdragbar"></div>
        <div class="outerDivForScroll">
            <div id="spExplorerTreeScrollDiv" class="innerDivForScroll">
                <div style="padding:6px;">
                    <div>
                        <input type="text" id="txtRootWebUrl" style=""/>
                        <input type="text" id="txtRestService" value="_api/web" style="display:none;" />
                    </div>
                    <div>
                        <select id="ddlSelectAccessPoint" onchange="return ddlSelectAccessPoint_onchange(this);">
                            <option value="_api/web">_api/web</option>
                            <option value="_api/site">_api/site</option>
                            <option value="_api/SP.UserProfiles.PeopleManager">_api/SP.UserProfiles.PeopleManager</option>
                            <option value="_api/search">_api/search</option>
                            <option value="_api/publishing">_api/publishing</option>
                        </select>
                        <button type="button" class="btn btn-default" id="btnGo" onclick="return btnGo_Click();">Go</button>
                    </div>
                </div>
                <div id="spExplorerTree" class="tree">
                </div>
            </div>
        </div>
    </div>

    <div id="SPEmain">
        <div id="errorMessage" class="alert alert-danger" role="alert" style="display: none"></div>
        <div id="oDataRequestInfo" class="alert alert-success" role="alert"></div>

        <div role="tabpanel" id="divTab">

            <ul class="nav nav-tabs" id="tabsResults">
                <li class="active">
                    <a href="#tabProperties" data-toggle="tab">Properties</a>
                </li>
                <li>
                    <a href="#tabResults" data-toggle="tab">Results</a>
                </li>
                <li>
                    <a href="#tabCamlGenerator" data-toggle="tab" style="display:none">CAML</a>
                </li>
            </ul>

            <div class="tab-content">
                <div class="tab-pane fade in active" id="tabProperties">
                    <div class="outerDivForScroll">
                        <nav class="navbar navbar-default">
                            <div class="container-fluid">
                            <button type="button" id="btnExportProperties" class="btn btn-default navbar-btn" onclick="return ExportHTMLTable('tabPropertiesScrollDiv');">Export</button>
                            </div>
                        </nav>
                        <div id="tabPropertiesScrollDiv" class="innerDivForScroll">
                            <table id="tblProperties" class='table table-hover' style="display: none">
                                <thead>
                                    <tr>
                                        <th>Property Name</th>
                                        <th>Value</th>
                                    </tr>
                                </thead>
                                <tbody></tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="tab-pane fade" id="tabResults">
                    <div class="outerDivForScroll">
                        <nav class="navbar navbar-default">
                                    <ul class="nav navbar-nav">
                                    <li class="dropdown">
                                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Select columns <span class="caret"></span></a>
                                        <ul id="ulSelectColumns" class="dropdown-menu" role="menu" style="height:300px;overflow:auto;">
                                        </ul>
                                    </li>
                                    </ul>
                                  <div class="container-fluid">
                                    <button type="button" id="btnExportResults" class="btn btn-default navbar-btn" onclick="return ExportHTMLTable('tabResultsScrollDiv');">Export</button>
                                    <button type="button" id="btnShowCamlBuilder" class="btn btn-default navbar-btn" onclick="return ShowCamlBuilderTab();">CAML</button>
                                    <button type="button" id="previousResultSet" class="btn btn-default navbar-btn">&lt; Previous</button>
                                    <button type="button" id="nextResultSet" class="btn btn-default navbar-btn">Next &gt;</button>
                                  </div>
                        
                                </nav>
                        <div id="tabResultsScrollDiv" class="innerDivForScroll">
                        </div>
                    </div>
                </div>
                <div class="tab-pane fade" id="tabCamlGenerator">
                    <div class="outerDivForScroll">
                        <ul class="nav nav-tabs" id="divCamlBuilderTabs">
                            <li>
                                <a href="#tabCamlListDetails" data-toggle="tab">List Details</a>
                            </li>
                            <li>
                                <a href="#tabCamlListFieldsDetails" data-toggle="tab">Fields Details</a>
                            </li>
                            <li class="active">
                                <a href="#tabCamlQuery" data-toggle="tab">Query</a>
                            </li>
                            <li>
                                <a href="#tabCamlResult" data-toggle="tab">Results</a>
                            </li>
                            <%--<li>
                                <a href="#tabCamlCSOM" data-toggle="tab">CSOM</a>
                            </li>--%>
                        </ul>
                        <div class="tab-content">
                            <div class="tab-pane fade" id="tabCamlListDetails">
                                <table class="table table-bordered table-striped">
                                    <tbody>
                                        <tr>
                                            <td>Node Type</td>
                                            <td>
                                                <label id="spNodeType"></label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Odata Url</td>
                                            <td>
                                                <label id="spOdataUrl"></label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>List Odata Url</td>
                                            <td>
                                                <label id="spListOdataUrl"></label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>List Id</td>
                                            <td>
                                                <label id="spListId"></label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>List Title</td>
                                            <td>
                                                <label id="spListTitle"></label>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="tab-pane fade" id="tabCamlListFieldsDetails">
                                <div id="tabCamlListFieldsDetailsDiv" class="innerDivForScroll">
                                <table class="table table-bordered table-striped">
                                    <tbody>
                                        <tr>
                                            <td>OdataUrl</td>
                                            <td>
                                                <label id="spListFieldsOdataUrl"></label>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div id="divSPFieldsDetails">
                                </div>
                                </div>
                            </div>
                            <div style="display: none" id="camlComparisionTemplate">

                                <div id="camlPropertySelectionTemplate" style="display: none">
                                    <%--<select id="ddlCamlRoot" onchange="return selectPropertyDDL_onchange(this);">
                                        <option value="">(Select)</option>
                                        <option value="And">Operator - AND</option>
                                        <option value="Or">Operator - OR</option>
                                        <option value="CountryName" typeasstring="Text">CountryName - [CountryName]</option>
                                        <option value="Region" typeasstring="Lookup">Region - [Region]</option>
                                        <option value="_ModerationComments" typeasstring="Note">Approver Comments - [_ModerationComments]</option>
                                        <option value="Status" typeasstring="Choice">Status - [Status]</option>
                                        <option value="ID" typeasstring="Counter">ID - [ID]</option>
                                        <option value="ContentType" typeasstring="Computed">Content Type - [ContentType]</option>
                                        <option value="Modified" typeasstring="DateTime">Modified - [Modified]</option>
                                        <option value="Author" typeasstring="User">Created By - [Author]</option>
                                        <option value="_HasCopyDestinations" typeasstring="Boolean">Has Copy Destinations - [_HasCopyDestinations]</option>
                                        <option value="owshiddenversion" typeasstring="Integer">owshiddenversion - [owshiddenversion]</option>
                                        <option value="Attachments" typeasstring="Attachments">Attachments - [Attachments]</option>
                                        <option value="_ModerationStatus" typeasstring="ModStat">Approval Status - [_ModerationStatus]</option>
                                        <option value="Order" typeasstring="Number">Order - [Order]</option>
                                        <option value="GUID" typeasstring="Guid">GUID - [GUID]</option>
                                    </select>--%>
                                </div>

                                <div id="camlOperatorTemplate" style="display: none">
                                    <select id="ddlOperator" onchange="return ddlOperator_onchange(this);">
                                        <option value="">(Select)</option>
                                        <option value="Eq">Equal</option>
                                        <option value="Neq">Not equal to</option>
                                        <option value="Gt">Greater than</option>
                                        <option value="Geq">Greater or equal</option>
                                        <option value="Lt">Less then</option>
                                        <option value="Leq">Less or equal</option>
                                        <option value="IsNull">Is Null</option>
                                        <option value="IsNotNull">Is Not Null</option>
                                        <option value="BeginsWith">Begins With</option>
                                        <option value="Contains">Contains</option>
                                        <option value="In">In</option>
                                    </select>
                                </div>

                                <div id="camlOperatorValueTemplate" style="display: none">
                                    <input id="chkUseId" type="checkbox" title="Use Id" />
                                    <label id="lblUseId">Use Id</label>
                                    <input id="txtPropertyValue" type="text" />&nbsp
                                    <button id="btnSelectValue" type="button" title="Select Value" onclick="return SelectFieldValue();">...</button>
                                </div>

                            </div>
                            <div class="tab-pane fade in active" id="tabCamlQuery">
                                <div id="tabCamlQuerySelectFieldsDiv" style="float: left; width: 15%;">
                                    <div id="tabCamlQuerySelectFieldsHeader" style="width:100%">
                                        <select id='ddlSelectCamlFieldOption' onchange='return ddlSelectCamlFieldOption_onchange(this);'>
                                            <option value='AllFields' camlFieldFilterType=0 jQuerySelector=''>All Fields</option>
                                            <option value='ShowHidden' camlFieldFilterType=1 jQuerySelector="[IsHidden='true']">Hidden = TRUE</option>
                                            <option value='HideHidden' camlFieldFilterType=1 jQuerySelector="[IsHidden='false']">Hidden = FALSE</option>
                                            <option value='ShowAllowMultipleValues' camlFieldFilterType=1 jQuerySelector="[AllowMultipleValues='true']">AllowMultipleValues = TRUE</option>
                                            <option value='HideAllowMultipleValues' camlFieldFilterType=1 jQuerySelector="[AllowMultipleValues='false']">AllowMultipleValues = FALSE</option>
                                            <option value='ShowSortable' camlFieldFilterType=1 jQuerySelector="[Sortable='true']">Sortable = TRUE</option>
                                            <option value='HideSortable' camlFieldFilterType=1 jQuerySelector="[Sortable='false']">Sortable = FALSE</option>
                                            <option value='ShowIndexed' camlFieldFilterType=1 jQuerySelector="[Indexed='true']">Indexed = TRUE</option>
                                            <option value='HideIndexed' camlFieldFilterType=1 jQuerySelector="[Indexed='false']">Indexed = FALSE</option>
                                            <option value='ShowCanBeDeleted' camlFieldFilterType=1 jQuerySelector="[CanBeDeleted='true']">CanBeDeleted = TRUE</option>
                                            <option value='HideCanBeDeleted' camlFieldFilterType=1 jQuerySelector="[CanBeDeleted='false']">CanBeDeleted = FALSE</option>
                                            <option value='ShowRequired' camlFieldFilterType=1 jQuerySelector="[Required='true']">Required = TRUE</option>
                                            <option value='HideRequired' camlFieldFilterType=1 jQuerySelector="[Required='false']">Required = FALSE</option>
                                            <option value='ShowFromBaseType' camlFieldFilterType=1 jQuerySelector="[FromBaseType='true']">FromBaseType = TRUE</option>
                                            <option value='HideFromBaseType' camlFieldFilterType=1 jQuerySelector="[FromBaseType='false']">FromBaseType = FALSE</option>
                                        </select>
                                        <label><input id='chkSelectAllCamlField' type='checkbox' onchange='return chkSelectAllCamlField_onChange(this)'/>Select All</label>
                                    </div>
                                    <div id="tabCamlQuerySelectFieldsListDiv" class="innerDivForScroll" style="width:100%">

                                    </div>
                                </div>
                                <div id="tabCamlQueryDiv" class="innerDivForScroll" style="height: 250px; float: left; width: 35%;">
                                    <nav class="navbar navbar-default">
                                        <div class="container-fluid">
                                            <button type="button" id="btnExecuteQuery" class="btn btn-default navbar-btn" onclick="return ExecuteCamlQuery_onClick(this);">Execute</button>
                                            <button type="button" id="btnClearQuery" class="btn btn-default navbar-btn" onclick="return btnClearQuery_onClick();">Clear</button>
                                        </div>
                                    </nav>
                                    <div class="tree" id="jsTreeCaml">
                                        <ul>
                                            <li>
                                                <span>
                                                    <i class="icon-minus-sign"></i>

                                                </span>
                                                <%--<ul>
                                                    <li>
                                                        <span>
                                                            <i class="icon-minus-sign"></i>
                                                            <select id="ddlCamlNode">
                                                                <option value="">(Select)</option>
                                                                <option value="AND">Operator - AND</option>
                                                                <option value="OR">Operator - OR</option>
                                                            </select>
                                                        </span>
                                                    </li>
                                                </ul>--%>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <div id="tabCamlQueryOptions" class="innerDivForScroll" style="float: left; width: 20%;">
                                    <div id="camlQueryOptionsHeader">
                                        <h4>Options</h4>
                                    </div>
                                    <label><input type="checkbox" id="chkFilesAndFolderOption" onchange='return chkFilesAndFolderOption_onChange(this)' />Files and folder option</label>
                                    <div id="divFilesAndFolderOption">
                                        <div class='radio'>
                                            <label><input type='radio' name='filesAndFolderOption' value='FilesOnly' id="chkfilesAndFolderOption_FilesOnly"/>Files Only</label>
                                        </div>
                                        <div class='radio'>
                                            <label><input type='radio' name='filesAndFolderOption' value='Recursive' id="chkfilesAndFolderOption_Recursive"/>Recursive</label>
                                        </div>
                                        <div class='radio'>
                                            <label><input type='radio' name='filesAndFolderOption' value='RecursiveAll' id="chkfilesAndFolderOption_RecursiveAll"/>Recursive All</label>
                                        </div>
                                        <div>
                                            <input type='text' class='form-control' id='txtCamlQueryServerRelativeUrl'/>
                                            <button title="Select folder" id="btnSelectCamlFolder" style="display: inline-block;" onclick="return ShowSelectCamlFolderDialog(this);" type="button">...</button>
                                        </div>
                                    </div>
                                    <%--<label><input type="checkbox" id="chkIncludeMandatoryColumns" />Include mandatory columns</label>--%>
                                    <label><input type="checkbox" id="chkCamlQueryRowLimit" onchange='return chkCamlQueryRowLimit_onChange(this)' />Row limit</label>
                                    <div id="divCamlQueryRowLimit">
                                        <input type='text' class='form-control' id='txtCamlQueryRowLimit'/>
                                    </div>
                                    <label><input type="checkbox" id="chkDatesInUTC" />Dates in UTC</label>
                                    <%--<label><input type="checkbox" id="chkExpandUserField"/>Expand user field</label>
                                    <label><input type="checkbox" id="chkIncludeAttachementUrl"/>Include attachement url</label>
                                    <label><input type="checkbox" id="chkIncludeAttachementVersion"/>Include attachement version</label>--%>
                                </div>
                                <div id="tabCamlQueryText" class="innerDivForScroll" style="width: 30%;">
                                    <div id="camlQueryTextHeader">
                                        <div style="float:left;margin:5px;"><h4>CAML Query</h4></div>
                                        <div style="float:right;margin:5px;">
                                            <button type="button" id="btnExecuteQueryFromTxt" class="btn btn-default navbar-btn" onclick="return btnExecuteQueryFromTxt_onClick(this);">Execute</button>    
                                        </div>
                                    </div>
                                    <div id="camlQueryTextBody" style="clear:both">
                                        <textarea id="textareaCamlQuery" rows="5" style="width:96%"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane fade" id="tabCamlResult">
                                <%--<div id="divCamlQuery" style="padding:5px">
                                   
                                </div>--%>
                                <div id="tabCamlResultDiv" class="innerDivForScroll">
                                    
                                </div>
                            </div>
                            <%--<div class="tab-pane fade" id="tabCamlCSOM">
                                CSOM
                            </div>--%>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div id="SPEfooter">
        <h6 id="SPEfooterText">SharePoint 2013 Explorer by <a href="https://www.linkedin.com/in/ravikhambhati">Ravi Khambhati</a></h6>
    </div>

    <div class="modal modal-static" id="processing-modal" role="dialog" aria-hidden="true" style="display: none">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="text-center">
                        <img src="http://www.travislayne.com/images/loading.gif" class="icon" />
                        <h4>
                            <label id="lblProgressBarText">Processing...</label></h4>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Modal -->
    <div class="modal fade" id="SPEModalDialogBox" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="SPEModalDialogBoxLabel">Modal title</h4>
                </div>
                <div class="modal-body" id="SPEModalDialogBoxBody">
                    ...
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal -->
    <div class="modal fade" id="selectFieldValueDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="selectFieldValueDialogTitle">Select Value</h4>
                </div>
                <div class="modal-body" id="selectFieldValueDialogBody">
                    <div id="selectFieldValueDiv">

                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" onclick="" id="btnSelectFieldValueFromList">Ok</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal select date -->
    <div class="modal fade" id="selectDateValueDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="selectDateValueDialogTitle">Select Date</h4>
                </div>
                <div class="modal-body" id="selectDateValueDialogBody">
                    <div id="selectDateValueDiv">
                        <div class='radio'>
                            <label><input type='radio' name='dateSelectionType' value='today' id="chkDateSelectionType_Today" onchange='return chkDateSelectionType_onChange(this);'/>Today</label>
                            <div id='divDateOffsetCheckBox'>
                                <div class='checkbox'>
                                    <label><input type='checkbox' id="chkAddOffset" value='' onchange='return chkAddOffset_onChange(this)'/>Add an offset to date</label>
                                </div>
                            </div>
                            <div id='divDateOffsetValue'>
                                <select class='form-control' id='ddlSelectDateOffsetType'>
                                    <option value="">+</option>
                                    <option value="-">-</option>
                                </select>
                                <input type='text' class='form-control' id='txtDateOffset'/>
                            </div>
                        </div>
                        <div class='radio'>
                            <label><input type='radio' name='dateSelectionType' value='specificdate' id="chkDateSelectionType_SpecificDate" onchange='return chkDateSelectionType_onChange(this);'/>Specific Date</label>
                            <div id='divDatePicker'><input type="text" id="txtDatePicker"/></div>
                            
                            <div id='divIsIncludeTimeValue' class='checkbox'>
                                <label><input type='checkbox' value='' id="chkIsIncludeTimeValue"/>Include Time Value</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" id="btnSelectDateValue">Ok</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Select user -->
    <div class="modal fade" id="selectUserValueDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="selectUserValueDialogTitle">Select User</h4>
                </div>
                <div class="modal-body" id="selectUserValueDialogBody">
                    <div id="selectUserValueDiv">
                        <div class='radio'>
                            <label><input type='radio' name='userSelectionType' value='currentUser' id="chkSelectionType_currentUser" onchange='return chkSelectionType_onChange(this);'/>Current User</label>
                        </div>
                        <div class='radio'>
                            <label><input type='radio' name='userSelectionType' value='specificUser' id="chkSelectionType_SpecificUser" onchange='return chkSelectionType_onChange(this);'/>Specific User</label>
                            <div id="divSpecificUser">
                                <input type='text' class='form-control typeahead' id='txtSelectUser' />
                            </div>
                        </div>
                        <div class='radio'>
                            <label><input type='radio' name='userSelectionType' value='membership' id="chkSelectionType_Membership" onchange='return chkSelectionType_onChange(this);'/>Membership</label>
                            <div id="divMembership">
                                <div id="divSelectMembershipType">
                                    <select class='form-control' id='ddlSelectMembershipType' onchange="return ddlSelectMembershipType_onChange(this);">
                                        <option value="CurrentUserGroups">CurrentUserGroups</option>
                                        <option value="SPGroup">SPGroup</option>
                                        <option value="SPGroup.Groups">SPGroup.Groups</option>
                                        <option value="SPGroup.AllUsers">SPGroup.AllUsers</option>
                                        <option value="SPGroup.Users">SPGroup.Users</option>
                                    </select>
                                </div>
                                <div id="divSelectMembershipGroup">
                                    <input type='text' class='form-control typeahead' id='txtSelectMembershipGroup' />
                                    <%--<select class='form-control' id='ddlSelectMembershipGroup'></select>--%>
                                </div>
                                <label id="lblMembership"></label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" id="btnSelectUserValue">Ok</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Select caml folder -->
    <div class="modal fade" id="selectCamlFolderDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="selectCamlFolderDialogTitle">Select folder</h4>
                </div>
                <div class="modal-body" id="selectCamlFolderDialogBody">
                    <div id="jstreeSelectCamlFolder"></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" id="btnSelectCamlFolderValue" onclick="return btnSelectCamlFolderValue_OnClick(this);">Ok</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <form runat="server">
        <SharePoint:FormDigest ID="FormDigest1" runat="server"></SharePoint:FormDigest>
    </form>
</body>
</html>
